import 'package:flutter/material.dart';

class Circle extends StatefulWidget {
  const Circle({Key? key}) : super(key: key);

  @override
  State<Circle> createState() => _CircleState();
}

class _CircleState extends State<Circle> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("小圈"),
      ),
      body: ListView(
        children: [
          Row(
            children: [
              _buildCard(),
              _buildCard(),
            ],
          ),
          Row(
            children: [
              _buildCard(),
              _buildCard(),
            ],
          ),
          Row(
            children: [
              _buildCard(),
              _buildCard(),
            ],
          )
        ],
      ),
    );
  }

  Widget _buildCard() {
    return SizedBox(
      width: MediaQuery.of(context).size.width / 2,
      child: Padding(
        padding: const EdgeInsets.all(3),
        child: Column(
          children: [
            Card(
              child: Image.network(
                  "https://img0.baidu.com/it/u=1321490384,2084905502&fm=253&fmt=auto&app=138&f=JPEG?w=779&h=357",
                  fit: BoxFit.fill),
            ),
            const Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(
                  "王者陪玩圈",
                  style: TextStyle(fontSize: 10),
                ),
                Text(
                  "999+动态",
                  style: TextStyle(fontSize: 10),
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}
